﻿CREATE FUNCTION [maint].[GetDevicePath]
(@DeviceName [sysname])
RETURNS NVARCHAR (512)
AS
BEGIN
	DECLARE @ReturnValue nvarchar(512)

	SELECT
		@ReturnValue = [phyname]
	FROM master.dbo.sysdevices
	WHERE ([name] = @DeviceName)

	RETURN(@ReturnValue)
END